<?php
declare(strict_types=1);
namespace cms\tencent\service;

use cms\tencent\model\AppModel;
use Hyperf\Di\Annotation\Inject;
use TencentCloud\Common\Credential;

class AppService extends CommonService
{
    /**
     * @Inject()
     * @var AppModel
     */
    public AppModel $model;

    /**
     * @param AppModel $app
     * @return Credential
     */
    public function initApp(AppModel $app): Credential
    {
        return new Credential($app->secret_id, $app->secret_key);
    }

}